import 'package:flutter/material.dart';

class NativeRefresh extends StatefulWidget {
  @override
  _NativeRefreshState createState() => _NativeRefreshState();
}

class _NativeRefreshState extends State<NativeRefresh> {
  Future _onRefresh() async {
    await Future.delayed(Duration(milliseconds: 1500));
  }

  @override
  Widget build(BuildContext context) {
    return RefreshIndicator(
      onRefresh: _onRefresh,
      child: ListView.builder(
        itemBuilder: (BuildContext context, int index) {
          return ListTile(
            title: Text('item_$index'),
          );
        },
        itemCount: 30,
      ),
    );
  }
}
